package com.cnzhy.mybatis.services.impl;

import com.cnzhy.mybatis.entity.CrmAdminUser;
import com.cnzhy.mybatis.mapper.CrmAdminUserMapper;
import com.cnzhy.mybatis.services.interfaces.CrmAdminUserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;


/**
 * @Author: zhaoyan5
 */
@Service
public class CrmAdminUserServiceImpl implements CrmAdminUserService {

    @Resource
    private CrmAdminUserMapper crmAdminUserMapper;

    @Override
    public int deleteByPrimaryKey(Long userId) {
        return crmAdminUserMapper.deleteByPrimaryKey(userId);
    }

    @Override
    public int insert(CrmAdminUser record) {
        return crmAdminUserMapper.insert(record);
    }

    @Override
    public int insertSelective(CrmAdminUser record) {
        return crmAdminUserMapper.insertSelective(record);
    }

    @Override
    public CrmAdminUser selectByPrimaryKey(Long userId) {
        return crmAdminUserMapper.selectByPrimaryKey(userId);
    }

    @Override
    public int updateByPrimaryKeySelective(CrmAdminUser record) {
        return crmAdminUserMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(CrmAdminUser record) {
        return crmAdminUserMapper.updateByPrimaryKey(record);
    }

    @Override
    public void updateUserNameByUserId(Long userId, String userName) {
        crmAdminUserMapper.updateUserNameByUserId(userId, userName);
    }
}
